﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ValueProviderTest.App_Start;

namespace ValueProviderTest.Controllers
{
    
    public class HomeController : Controller
    {
        // GET: Home
       [CustomValueProviderProvider]
        public ActionResult Index(User u)
        {
            var req = Request;
            return Json(u,JsonRequestBehavior.AllowGet);
        }
        public ActionResult Test(User u)
        {
            var req = Request;
            return Content("test");
        }
       
    }
    public class User
    {
        public int id { get; set; }
        public string name { get; set; }
        public Address addr { get; set; }
    }
    public class Address
    {
        public int id { get; set; }
    }
}